#!/usr/bin/bash

COMMAND="build"
if [ "$1" != "" ]
then
    COMMAND="$1"
fi

for TARGET in CortexM{0P,4F,4NF,7}
do
    TARGET=${TARGET} make ${COMMAND} || break
done
